package org.wattdepot.cli.processor;

import java.util.List;

/**
 * The help command for the Watt Depot CLI.
 * @author Kim
 *
 */

public class HelpCommand implements WattDepotCliCommand {

  @Override
  public String doCommand(List<String> args) {
    String output = "";

    output += "  help \n";
    output += "    This message \n";
    output += "  quit \n";
    output += "    Exits the system \n";
    output += "  sources \n";
    output += "    Prints a table summarizing the public sources in the system, one per line. \n";
    output += "  summary {source) \n";
    output += "    Prints information about a single source.\n";
    output += "  sensordata {source} timestamp {timestamp}\n";
    output += "    Prints information about a single sensor data instance.\n";
    output += "  dailysensordata {source} day {day}\n";
    output += "    Prints a table listing all of the sensor data instances for the " +
      "specified day.\n";
    output += "  power [generated|consumed] {source} timestamp {timestamp}\n";
    output += "    Prints the power generated by the source at the given timestamp.\n";
    output += "  powerstats [generated|consumed] {source} day {day} sampling-interval "
            + "{minutes} statistic {max|min|average}\n";
    output += "    Returns the maximum, minimum, or average power generated by the source for " 
            + "the day.\n";
    output += "  total [carbon|energy] {source} day {day} sampling-interval {minutes}\n";
    output += "    Returns the total amount of carbon (or energy) emitted by this source for the "
            + "given day.\n";
    output += "  chart power [generated|consumed] {source} {startday} {endday} sampling-interval "
            + "{minutes} file {file}\n";
    output += "    Writes out an html file that will display a chart illustrating the power for "
            + "the source over the interval.\n";
    output += "  fueltypes {source}\n";
    output += "    Returns a table of fuels associated with this source.\n";
    output += "  totalpower {source} {timestamp} fuelType {fuelType}\n";
    output += "    Returns the total power generated by the given fuel type. \n";
    output += "  carboncontent {source} {timestamp} sampling-interval {interval}\n";
    output += "    Returns the total carbon that would be emitted by that source over an hour "
            + "at the rate occurring as of the timestamp."; 
    return output;
  }

}
